# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=pwncat
pkgver=0.1.2
pkgrel=5
groups=('blackarch' 'blackarch-backdoor' 'blackarch-scanner' 'blackarch-proxy'
        'blackarch-networking')
pkgdesc='Bind and reverse shell handler with FW/IDS/IPS evasion, self-inject and port-scanning.'
url='https://github.com/cytopia/pwncat'
license=('MIT')
arch=('any')
depends=('python')
makedepends=('python-setuptools' 'python-pip' 'python-wheel')
source=("$pkgname-$pkgver.tar.gz::https://github.com/cytopia/$pkgname/archive/v$pkgver.tar.gz")
sha512sums=('d049f701ba7ba853e298b82406a36d355e45ebe3eb6a617a895c74d03999951fb4f56b3c886c252599ede6b8598591225a0daaef21601974cf6cf8e2e6ef3df7')

package() {
  cd "$pkgname-$pkgver"

  install -Dm 755 bin/$pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 man/$pkgname.1 -t "$pkgdir/usr/share/man/man1"
  install -Dm 644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  install -Dm 644 README.md CHANGELOG.md -t "$pkgdir/usr/share/doc/$pkgname/"

  cp --no-preserve=ownership -a pse "$pkgdir/usr/share/doc/$pkgname/"
}

